package model.dao;

import java.io.IOException;
import java.io.Reader;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;



public class DAOparser {
	private static SqlMapClient client;
	public static SqlMapClient getParser(){
		if(client == null){
			try{
				Reader reader = Resources.getResourceAsReader("conf/SqlMapConfig.xml");
				client = SqlMapClientBuilder.buildSqlMapClient(reader);
				reader.close();
			}catch(IOException e){
				System.out.println("XML Config Load 실패"+e);
			}
		}
		return client;
	}
}
